package com.ddpt.platform.common.exception.error;

import com.ddpt.platform.common.exception.ErrorCodeDefinition;

/**
 * 开放接口基础异常定义
 * 错误码: 90000-99999
 */
public enum OpenApiBaseErrorEnum implements ErrorCodeDefinition {

    lost_app_id(90101,"缺少appId"),
    lost_action(90102,"缺少action"),
    lost_sign(90103,"缺少sign"),
    lost_serial(90104,"缺少serialNumber"),
    lost_timestamp(90105,"缺少timestamp"),
    lost_body(90106,"缺少请求体body"),
    lost_union_id(90107,"缺少请求用户标识"),
    lost_phone(90108,"缺少请求用户手机号"),
    lost_param(90109,"缺少请求参数"),
    request_expire(90201,"请求已过期"),
    time_error(90202,"时间戳不合法"),

    action_error(90301,"action不合法"),
    action_auth_error(90302,"暂无权限"),
    sign_error(90303,"签名校验失败"),

    currency_not_exist(90401,"代币不存在"),
    member_not_exist(90402,"会员信息不存在"),



    ;

    private final int code;
    private final String remark;

    OpenApiBaseErrorEnum(int code, String remark) {
        this.code = code;
        this.remark = remark;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getRemark() {
        return remark;
    }
}
